# -*- coding: utf-8 -*-

from core.serializers import CustomModelSerializer
from core.relations import BaseNameWritableRelatedField
from apps.rms.models import Interface
from rest_framework import serializers


class InterfaceSerializer(CustomModelSerializer):
    """
    接口对象-序列化器
    """
    product = BaseNameWritableRelatedField()

    class Meta:
        model = Interface
        fields = "__all__"
        read_only_fields = ["id"]
